﻿cmake_minimum_required(VERSION 2.8)
project(FFmpeg)

file(READ config.h config0)
string(REPLACE "#define " "set(" config1 ${config0})
string(REPLACE "/*" "#" config2 ${config1})
string(REPLACE "\n" ")\n" config3 ${config2})
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.cmake ${config3})
include(${CMAKE_CURRENT_BINARY_DIR}/config.cmake)

add_definitions(-D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -DPIC -I${CMAKE_CURRENT_SOURCE_DIR}/compat/atomics/win32)
add_definitions(-nologo -FIstdlib.h -Dinline=__inline)
add_definitions(-D__STDC_CONSTANT_MACROS)

add_subdirectory(libavutil)
add_subdirectory(libswresample)
add_subdirectory(libavcodec)
add_subdirectory(libavformat)
add_subdirectory(libswscale)
add_subdirectory(libavfilter)
add_subdirectory(libavdevice)
